import type { DateTimeFormats, NumberFormats } from '@intlify/core-base';
import type { I18n } from "vue-i18n";
type Messages = any;
type OptionLocale = any;

import { createI18n } from "vue-i18n";
// 本地语言包
import enLocale from "./package/en";
import zhCnLocale from "./package/zh-cn";

// 导入 Element Plus 中英文语言包
import en from "element-plus/es/locale/lang/en";
import zhCn from "element-plus/es/locale/lang/zh-cn";


const messages = {
  "zh-cn": {
    ...zhCn,
    ...zhCnLocale,
  },
  en: {
    ...en,
    ...enLocale,
  },
};

const i18n: any = createI18n({
  legacy: false,
  locale: "zh-cn",
  fallbackLocale: 'zh-cn',
  messages: messages,
  globalInjection: true,
});

export default i18n;
